import axios from '@/libs/api.request'
let baseUrl = ''
// 会员等级列表
export const getMemberLevelList = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/level/query',
    method: 'post',
    data: data
  })
}

// 新增会员等级
export const saveMemberLevel = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/level/save',
    method: 'post',
    data: data
  })
}

// 更新会员等级
export const updateMemberLevel = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/level/update',
    method: 'post',
    data: data
  })
}

// 删除会员等级
export const delMemberLevel = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/level/delete',
    method: 'post',
    data: data
  })
}

// 查询新建等级信息
export const getCreateMemberLevel = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/level/query/new/member/level',
    method: 'post',
    data: data
  })
}

// 获取成长规则
export const getGrowthRule = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/benefit/level/query',
    method: 'post',
    data: data
  })
}

// 保存成长规则
export const saveGrowthRule = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/benefit/level/save',
    method: 'post',
    data: data
  })
}

// 获取会员权益列表
export const getMemberRightsList = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/benefit/list',
    method: 'post',
    data: data
  })
}

// 获取会员权益详情
export const getMemberRights = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/benefit/query',
    method: 'post',
    data: data
  })
}

// 删除会员权益
export const delMemberRights = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/benefit/delete',
    method: 'post',
    data: data
  })
}

// 更新保存会员权益
export const saveMemberRights = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/benefit/save',
    method: 'post',
    data: data
  })
}

// 批量设置会员等级 （会员权益规则设置）
export const setMemberRights = (data) => {
  return axios.request({
    url: baseUrl + '/merchant/member/level/list/update',
    method: 'post',
    data: data
  })
}
